package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2019/1/10 14:06
 * @description
 */
public class Code706 {
}

class MyHashMap {
    private int[] result;

    /**
     * Initialize your data structure here.
     */
    public MyHashMap() {
        result = new int[1000000];
        for (int i = 0; i < result.length; i++) {
            result[i] = -1;
        }
    }

    /**
     * value will always be non-negative.
     */
    public void put(int key, int value) {
        result[key] = value;
    }

    /**
     * Returns the value to which the specified key is mapped, or -1 if this map contains no mapping for the key
     */
    public int get(int key) {
        return result[key];
    }

    /**
     * Removes the mapping of the specified value key if this map contains a mapping for the key
     */
    public void remove(int key) {
        result[key] = -1;
    }
}